-- GENERATED SPELL FOR [Glumdor] --


function spell0_20730(pUnit, Event) --@Cutdown,n/a--
pUnit:FullCastSpellOnTarget(32009,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20730', 616, 1)
end

function spell1_20730(pUnit, Event) --@Demoralizing Shout,Self--
pUnit:FullCastSpellOnTarget(13730,pUnit)
pUnit:RegisterEvent('Sorts_20730', 30346, 1)
end

function spell2_20730(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_20730', 578, 1)
end

function spell3_20730(pUnit, Event) --@Steal Weapon,n/a--
pUnit:FullCastSpellOnTarget(36208,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20730', 6320, 1)
end

function Sorts_20730(pUnit, Event)
local choix_sorts_20730 = math.random(0, 3)
if choix_sorts_20730 == 0 then
pUnit:RegisterEvent('spell0_20730', 1, 1)
end
if choix_sorts_20730 == 1 then
pUnit:RegisterEvent('spell1_20730', 1, 1)
end
if choix_sorts_20730 == 2 then
pUnit:RegisterEvent('spell2_20730', 1, 1)
end
if choix_sorts_20730 == 3 then
pUnit:RegisterEvent('spell3_20730', 1, 1)
end
end

function mob20730_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20730', math.random(1500, 3000), 1)
end

function mob20730_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20730_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20730_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20730, 1, 'mob20730_Action')
RegisterUnitEvent(20730, 2, 'mob20730_Leave')
RegisterUnitEvent(20730, 3, 'mob20730_Kill')
RegisterUnitEvent(20730, 4, 'mob20730_Die')
